package org.homeorganiser.flex.manager;

import java.util.Collection;
import java.util.List;

import org.homeorganiser.flex.dao.CategoryDAO;
import org.homeorganiser.flex.dao.GenreDAO;
import org.homeorganiser.flex.dao.LanguageDAO;
import org.homeorganiser.flex.dao.LocationDAO;
import org.homeorganiser.flex.dao.PublicationDAO;
import org.homeorganiser.flex.dao.QualityDAO;
import org.homeorganiser.flex.dao.ScreenShotDAO;
import org.homeorganiser.flex.dao.SubCategoryDAO;
import org.homeorganiser.flex.dao.TypeDAO;
import org.homeorganiser.flex.dto.Category;
import org.homeorganiser.flex.dto.Genre;
import org.homeorganiser.flex.dto.Language;
import org.homeorganiser.flex.dto.Location;
import org.homeorganiser.flex.dto.Publication;
import org.homeorganiser.flex.dto.Quality;
import org.homeorganiser.flex.dto.ScreenShot;
import org.homeorganiser.flex.dto.SubCategory;
import org.homeorganiser.flex.dto.Type;

public class UtilManager implements IUtilManager {

	CategoryDAO categorydao;
	SubCategoryDAO subCategorydao;
	GenreDAO genredao;
	LanguageDAO languagedao;
	LocationDAO locationdao;
	PublicationDAO publicationdao;
	QualityDAO qualitydao;
	ScreenShotDAO screenshotdao;
	TypeDAO typedao;
	
	
	
	/**
	 * @return the categorydao
	 */
	public CategoryDAO getCategorydao() {
		return categorydao;
	}

	/**
	 * @param categorydao the categorydao to set
	 */
	public void setCategorydao(CategoryDAO categorydao) {
		this.categorydao = categorydao;
	}

	/**
	 * @return the subCategorydao
	 */
	public SubCategoryDAO getSubCategorydao() {
		return subCategorydao;
	}

	/**
	 * @param subCategorydao the subCategorydao to set
	 */
	public void setSubCategorydao(SubCategoryDAO subCategorydao) {
		this.subCategorydao = subCategorydao;
	}

	/**
	 * @return the genredao
	 */
	public GenreDAO getGenredao() {
		return genredao;
	}

	/**
	 * @param genredao the genredao to set
	 */
	public void setGenredao(GenreDAO genredao) {
		this.genredao = genredao;
	}

	/**
	 * @return the languagedao
	 */
	public LanguageDAO getLanguagedao() {
		return languagedao;
	}

	/**
	 * @param languagedao the languagedao to set
	 */
	public void setLanguagedao(LanguageDAO languagedao) {
		this.languagedao = languagedao;
	}

	/**
	 * @return the locationdao
	 */
	public LocationDAO getLocationdao() {
		return locationdao;
	}

	/**
	 * @param locationdao the locationdao to set
	 */
	public void setLocationdao(LocationDAO locationdao) {
		this.locationdao = locationdao;
	}

	/**
	 * @return the publicationdao
	 */
	public PublicationDAO getPublicationdao() {
		return publicationdao;
	}

	/**
	 * @param publicationdao the publicationdao to set
	 */
	public void setPublicationdao(PublicationDAO publicationdao) {
		this.publicationdao = publicationdao;
	}

	/**
	 * @return the qualitydao
	 */
	public QualityDAO getQualitydao() {
		return qualitydao;
	}

	/**
	 * @param qualitydao the qualitydao to set
	 */
	public void setQualitydao(QualityDAO qualitydao) {
		this.qualitydao = qualitydao;
	}

	/**
	 * @return the screenshotdao
	 */
	public ScreenShotDAO getScreenshotdao() {
		return screenshotdao;
	}

	/**
	 * @param screenshotdao the screenshotdao to set
	 */
	public void setScreenshotdao(ScreenShotDAO screenshotdao) {
		this.screenshotdao = screenshotdao;
	}

	/**
	 * @return the typedao
	 */
	public TypeDAO getTypedao() {
		return typedao;
	}

	/**
	 * @param typedao the typedao to set
	 */
	public void setTypedao(TypeDAO typedao) {
		this.typedao = typedao;
	}

	public List<Language> getAllLanguage(int invtype) {
		return languagedao.findAll(invtype);
	}

	public List<Genre> getAllGenre(int invtype) {
		return genredao.findAll(invtype);
	}

	public List<Type> getAllType(int invtype) {
		return typedao.findAll(invtype);
	}

	public List<Category> getAllCategory(int invtype) {
		return categorydao.findAll(invtype);
	}

	public List<SubCategory> getAllSubCategory(int invtype) {
		return subCategorydao.findAll(invtype);
	}

	public List<Location> getAllLocation(int invtype) {
		return locationdao.findAll(invtype);
	}

	public List<Quality> getAllQuality(int invtype) {
		return qualitydao.findAll(invtype);
	}

	public List<ScreenShot> getAllScreenshot(int inventoryid, int invtype) {
		// TODO Auto-generated method stub
		return null;
	}

	public Genre addGenre(Genre genre) {
		return genredao.create(genre);
	}

	public Type addType(Type type) {
		return typedao.create(type);
	}

	public Language addLanguage(Language lang) {
		return languagedao.create(lang);
	}

	public Category addCategory(Category cat) {
		return categorydao.create(cat);
	}

	public SubCategory addSubCategory(SubCategory subcat) {
		return subCategorydao.create(subcat);
	}

	public Location addLocation(Location location) {
		return locationdao.create(location);
	}

	public Quality addQuality(Quality quality) {
		return qualitydao.create(quality);
	}

	public ScreenShot addScreenShot(ScreenShot screenshot) {
		return screenshotdao.create(screenshot);
	}

	public String addAllScreenShot(Collection<ScreenShot> screenshot,
			int invtype, int invid) {
		// TODO Auto-generated method stub
		return null;
	}

	public List<Publication> getAllPublication(int invtype) {
		return publicationdao.findAll(invtype);
	}

	public Publication addPublication(Publication publication) {
		return publicationdao.create(publication);
	}

}
